﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="P02_Edit.aspx.vb" Inherits="P02_Edit" %>

<%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        input {
            font-family: Tahoma !important;
            font-size: 10px !important;
        }

        html * {
            font-family: Tahoma;
            font-size: 10px;
        }
    </style>
    <style>
        .WI3-F-N {
            border: none !important;
        }

        .WI3-F-O {
            border: none !important;
        }

        .tdstyle {
            border: 1px solid #808080;
            font-family: Tahoma;
            vertical-align: top;
            background-color: lightgray;
        }

        .tdstyle2 {
            border: 1px solid #808080;
            font-family: Tahoma;
            vertical-align: top;
        }

        .tdstyle3 {
            text-align: center;
            border: 1px solid #808080;
            font-family: Tahoma;
            vertical-align: top;
            font-size: 11px;
            background-color: #75b6ed;
        }
    </style>
    <script>
        function ClosePop() {
            window.parent.TINY.box.hide();
        }
        function isNumberKey(evt) {
            var charCode = (evt.which) ? evt.which : event.keyCode

            if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46)
                return false;

            return true;
        }
        function ClearComma(obj) {
            var str = "";
            
            str = obj.value;
            str = str.replace(/\,/g, '');

            obj.value = str;
            var n = str.length;
            SelectPos(obj, n);
        }

        function SelectPos(obj, pos) {
            var input = obj;
            if ('selectionStart' in input) {
                input.selectionStart = pos;
                input.selectionEnd = pos;
                input.focus();
            }
            else {  // Internet Explorer before version 9
                var inputRange = input.createTextRange();
                inputRange.moveStart("character", pos);
                inputRange.collapse();
                inputRange.moveEnd("character", pos);
                inputRange.select();
            }
        }

        function SetComma(obj) {
            var x;
            x = obj.value;
            var y;
			if (x != null && x !== undefined && x !=='') {
			y = parseFloat(x);
			}
			else{y = 0;}
            
            x = y.toFixed(2);
            x = addCommas(x)
            //x = x.replace(/\.00$/, '');
            obj.value = x;
            CalSum();
        }

        function addCommas(NumberStr) {
            NumberStr = parseFloat(NumberStr).toFixed(2);
            NumberStr += '';
            NumberData = NumberStr.split('.');
            Number1 = NumberData[0];
            Number2 = NumberData.length > 1 ? '.' + NumberData[1] : '';
            var rgx = /(\d+)(\d{3})/;
            while (rgx.test(Number1)) {
                Number1 = Number1.replace(rgx, '$1' + ',' + '$2');
            }
            var FinalNum = Number1 + Number2;
            FinalNum = FinalNum.replace('NaN', 0)
            FinalNum = FinalNum.replace(/\.00$/, '');
            return FinalNum;
        }

        function CalSum() {
            // A = คงเหลือ
            // B = ให้กู้เพิ่ม
            // C = รับคืน
            // D = เพิ่มสุทธิ
            // E = รายได้ดอกเบี้ย
            // F = อัตราผลตอบแทนเฉลี่ย
            var CS2 = 0;
            var BS2 = 0;
            for (var i = 13; i <= 24 ; i++) {
                // 
                // calculate เพิ่มสุทธิ of current year 
                // เพิ่มสุทธิ = ให้กู้เพิ่ม - รับคืน
                // 
                document.getElementById("D" + i.toString()).value = addCommas(parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, '')) - parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, '')))
                CS2 += parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, ''))
                BS2 += parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, ''))
            }
            // calculate sum of ให้กู้เพิ่ม, รับคืน, เพิ่มสุทธิ of current year 
            var DS2 = BS2 - CS2;
            document.getElementById("BSUM2").value = addCommas(BS2);
            document.getElementById("CSUM2").value = addCommas(CS2);
            document.getElementById("DSUM2").value = addCommas(DS2);

            var CS0 = 0;
            var BS0 = 0;
            var DS0 = 0;
            // calculate sum of ให้กู้เพิ่ม, รับคืน, เพิ่มสุทธิ of previous year month 1-5
            for (var i = 1; i <= 5 ; i++) {
                /* no need
                document.getElementById("D" + i.toString()).value = addCommas(parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, '')) - parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, '')))
                */
                CS0 += parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, ''))
                BS0 += parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, ''))
                DS0 += parseFloat(document.getElementById("D" + i.toString()).value.replace(/\,/g, ''))
            }
            //alert(CS0);
            document.getElementById("CSUM0").value = addCommas(CS0);
            document.getElementById("BSUM0").value = addCommas(BS0);
            document.getElementById("DSUM0").value = addCommas(DS0);

            var CS1 = 0;
            var BS1 = 0;
            // calculate sum of ให้กู้เพิ่ม, รับคืน, เพิ่มสุทธิ of previous year month 6-12
            for (var i = 6; i <= 12 ; i++) {
                document.getElementById("D" + i.toString()).value = addCommas(parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, '')) - parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, '')))
                CS1 += parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, ''))
                BS1 += parseFloat(document.getElementById("B" + i.toString()).value.replace(/\,/g, ''))
            }
            var DS1 = BS1 - CS1;
            document.getElementById("BSUM1").value = addCommas((BS0 + BS1));
            document.getElementById("CSUM1").value = addCommas((CS0 + CS1));
            document.getElementById("DSUM1").value = addCommas((DS0 + DS1));

            // calculate คงเหลือ of previous year month 6-12 and current year
            for (var i = 6; i <= 24 ; i++) {
                // คงเหลือ = คงเหลือ (ของเดือนก่อน) + เพิ่มสุทธิ
                document.getElementById("A" + i.toString()).value = addCommas(parseFloat(document.getElementById("A" + (i - 1).toString()).value.replace(/\,/g, '')) + parseFloat(document.getElementById("D" + i.toString()).value.replace(/\,/g, '')))
            }
            /* ne need
            for (var i = 1; i <= 24 ; i++) {
                // คงเหลือ = คงเหลือ (ของเดือนก่อน) + เพิ่มสุทธิ
                if (i != 1) {
                    document.getElementById("A" + i.toString()).value = addCommas(parseFloat(document.getElementById("A" + (i - 1).toString()).value.replace(/\,/g, '')) + parseFloat(document.getElementById("D" + i.toString()).value.replace(/\,/g, '')))
                }
                else { document.getElementById("A" + i.toString()).value = addCommas(parseFloat(document.getElementById("A" + (i).toString()).value.replace(/\,/g, '')) + parseFloat(document.getElementById("D" + i.toString()).value.replace(/\,/g, ''))) 
                }
            }
            */
            // calculate sum of คงเหลือ 
            document.getElementById("ASUM0").value = addCommas(parseFloat(document.getElementById("A5").value.replace(/\,/g, '')));
            document.getElementById("ASUM1").value = addCommas(parseFloat(document.getElementById("A12").value.replace(/\,/g, '')));
            document.getElementById("ASUM2").value = addCommas(parseFloat(document.getElementById("A24").value.replace(/\,/g, '')));

            var ES0 = 0;
            var FS0 = 0;
            
            /* no need
            // รายได้ดอกเบี้ย
            for (var i = 1; i <= 5 ; i++) {
                // calculate รายได้ดอกเบี้ย of previous year month 1-5
                var A = document.getElementById("A" + i.toString()).value.replace(/\,/g, '');
                var C = parseFloat(document.getElementById("C" + i.toString()).value.replace(/\,/g, ''));
                //var F = document.getElementById("F" + i.toString()).value.replace(/\,/g, '');
                //var E = parseFloat((parseFloat(A) / 100 * parseFloat(F)) / 12);
                //ดอกเบี้ยจ่าย = DEBIT(mapped accounts)
                var E = C
                // อัตราดอกเบี้ยจ่าย = (ดอกเบี้ยจ่าย*12 )/(คงเหลือ/100)
                var F = (E * 12) / (A / 100);
                document.getElementById("E" + i.toString()).value = addCommas(E);
                document.getElementById("F" + i.toString()).value = addCommas(parseFloat(F));

                ES0 += parseFloat(document.getElementById("E" + i.toString()).value.replace(/\,/g, ''))
                FS0 += parseFloat(document.getElementById("F" + i.toString()).value.replace(/\,/g, ''))
            }
            document.getElementById("ESUM0").value = addCommas(ES0);
            document.getElementById("FSUM0").value = addCommas(FS0 / 5);
            */

            var ES1 = 0;
            var FS1 = 0;
            for (var i = 6; i <= 12 ; i++) {
                //alert(parseFloat(parseFloat(document.getElementById("A" + i.toString()).value.replace(/\,/g, '')) / 100 * parseFloat(document.getElementById("F" + i.toString()).value.replace(/\,/g, ''))));

                // calculate รายได้ดอกเบี้ย of previous year month 6-12
                var A = document.getElementById("A" + i.toString()).value.replace(/\,/g, '');
                var F = document.getElementById("F" + i.toString()).value.replace(/\,/g, '');
                var E = parseFloat((parseFloat(A) / 100 * parseFloat(F)) / 12);
                document.getElementById("E" + i.toString()).value = addCommas(E);

                ES1 += parseFloat(document.getElementById("E" + i.toString()).value.replace(/\,/g, ''))
                FS1 += parseFloat(document.getElementById("F" + i.toString()).value.replace(/\,/g, ''))
            }
            document.getElementById("ESUM1").value = addCommas((ES0 + ES1));
            document.getElementById("FSUM1").value = addCommas((FS0 + FS1) / 12);

            var ES2 = 0;
            var FS2 = 0;
            for (var i = 13; i <= 24 ; i++) {
                // calculate รายได้ดอกเบี้ย of current year 
                var A = document.getElementById("A" + i.toString()).value.replace(/\,/g, '');
                var F = document.getElementById("F" + i.toString()).value.replace(/\,/g, '');
                var E = parseFloat((parseFloat(A) / 100 * parseFloat(F)) / 12);
                document.getElementById("E" + i.toString()).value = addCommas(E);

                ES2 += parseFloat(document.getElementById("E" + i.toString()).value.replace(/\,/g, ''))
                FS2 += parseFloat(document.getElementById("F" + i.toString()).value.replace(/\,/g, ''))
            }

            document.getElementById("ESUM2").value = addCommas(ES2);
            document.getElementById("FSUM2").value = addCommas(FS2 / 12);
        }

        function DisableBtn() {
            try {
                var btn = document.getElementById("SaveDocument");
                btn.disabled = true;
            }
            catch (err) {
            }
        }
        window.onbeforeunload = DisableBtn;

        function WebInputOnKeyDown(controlId) {
            var textval = document.getElementById(controlId).value.toString();
            if (textval.length > 9) {
                if (event.keyCode < 48) {
                    return true;
                } else {
                    event.returnValue = false;
                    return false;
                }
            }
        }

        function WebInputOnKeyDown2(controlId) {
            var textval = document.getElementById(controlId).value.toString();
            if (textval.length > 4) {
                if (event.keyCode < 48) {
                    return true;
                } else {
                    event.returnValue = false;
                    return false;
                }
            }
        }
    </script>
    <style>
        input[type="text"] {
            border: none;
            width: 57px;
            height: 18px;
            font-family: Tahoma;
            font-size: 10px !important;
        }

            input[type="text"].readonly {
                background-color: #f3f3f3;
            }

            input[type="text"].readonly2 {
                background-color: #ffeaea;
            }
    </style>
</head>
<body onkeydown="return (event.keyCode!=13)">
    <form id="form1" runat="server">
        <div>
            <asp:Label ID="name1" runat="server" Text="ชื่อผลิตภัณฑ์" Font-Size="12px" Font-Bold="true"></asp:Label>
            <table width="1000px" style="text-align: left; vertical-align: text-top; border: 1px solid #f3f3f3;" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="tdstyle3" colspan="3"></td>
                    <td class="tdstyle3">ม.ค.</td>
                    <td class="tdstyle3">ก.พ.</td>
                    <td class="tdstyle3">มี.ค.</td>
                    <td class="tdstyle3">เม.ย.</td>
                    <td class="tdstyle3">พ.ค.</td>
                    <td class="tdstyle3">มิ.ย.</td>
                    <td class="tdstyle3">ก.ค.</td>
                    <td class="tdstyle3">ส.ค.</td>
                    <td class="tdstyle3">ก.ย.</td>
                    <td class="tdstyle3">ต.ค.</td>
                    <td class="tdstyle3">พ.ย.</td>
                    <td class="tdstyle3">ธ.ค.</td>
                    <td class="tdstyle3">รวม</td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="30px" rowspan="12" style="text-align: center; font-size: 11px;">
                        <asp:Label ID="year1" runat="server" Text="y-1" Font-Size="11px"></asp:Label></td>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 11px;">คงเหลือ</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="A_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="A_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" tabindex="1" class="readonly" name="A1" id="A1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="2" class="readonly" name="A2" id="A2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="3" class="readonly" name="A3" id="A3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="4" class="readonly" name="A4" id="A4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="5" class="readonly" name="A5" id="A5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="6" class="readonly2" name="ASUM0" id="ASUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="7" class="readonly2" name="A6" id="A6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="8" class="readonly2" name="A7" id="A7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="9" class="readonly2" name="A8" id="A8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="11" class="readonly2" name="A9" id="A9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="12" class="readonly2" name="A10" id="A10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="13" class="readonly2" name="A11" id="A11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="14" class="readonly2" name="A12" id="A12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server"  tabindex="15" class="readonly2" name="ASUM1" id="ASUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 11px;">ให้กู้เพิ่ม</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="B_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="B_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" tabindex="16" class="readonly" name="B1" id="B1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="17" class="readonly" name="B2" id="B2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="18" class="readonly" name="B3" id="B3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="19" class="readonly" name="B4" id="B4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="20" class="readonly" name="B5" id="B5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="21" class="readonly2" name="BSUM0" id="BSUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="22" name="B6" id="B6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="23" name="B7" id="B7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="24" name="B8" id="B8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="25" name="B9" id="B9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="26" name="B10" id="B10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="27" name="B11" id="B11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="28" name="B12" id="B12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="29" class="readonly2" name="BSUM1" id="BSUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 11px;">รับคืน</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="C_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="C_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" class="readonly" name="C1" id="C1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="30" class="readonly" name="C2" id="C2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="31" class="readonly" name="C3" id="C3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="32" class="readonly" name="C4" id="C4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="33" class="readonly" name="C5" id="C5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="34" class="readonly2" name="CSUM0" id="CSUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="35" name="C6" id="C6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="36" name="C7" id="C7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="37" name="C8" id="C8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="38" name="C9" id="C9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="39" name="C10" id="C10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="40" name="C11" id="C11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="41" name="C12" id="C12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="42" class="readonly2" name="CSUM1" id="CSUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 11px;">เพิ่มสุทธิ</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="D_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="D_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" tabindex="43" class="readonly" name="D1" id="D1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="44" class="readonly" name="D2" id="D2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="45" class="readonly" name="D3" id="D3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="46" class="readonly" name="D4" id="D4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="47" class="readonly" name="D5" id="D5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="48" class="readonly2" name="DSUM0" id="DSUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="49" class="readonly2" name="D6" id="D6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="50" class="readonly2" name="D7" id="D7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="51" class="readonly2" name="D8" id="D8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="52" class="readonly2" name="D9" id="D9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="53" class="readonly2" name="D10" id="D10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="54" class="readonly2" name="D11" id="D11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="55" class="readonly2" name="D12" id="D12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="56" class="readonly2" name="DSUM1" id="DSUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 11px;">รายได้ดอกเบี้ย</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="E_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="E_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" tabindex="57" class="readonly" name="E1" id="E1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="58" class="readonly" name="E2" id="E2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="59" class="readonly" name="E3" id="E3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="60" class="readonly" name="E4" id="E4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="61" class="readonly" name="E5" id="E5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="62" class="readonly2" name="ESUM0" id="ESUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="63" class="readonly2" name="E6" id="E6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="64" class="readonly2" name="E7" id="E7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="65" class="readonly2" name="E8" id="E8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="66" class="readonly2" name="E9" id="E9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="67" class="readonly2" name="E10" id="E10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="68" class="readonly2" name="E11" id="E11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="69" class="readonly2" name="E12" id="E12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="70" class="readonly2" name="ESUM1" id="ESUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" rowspan="2" style="text-align: center; font-size: 9px;">อัตราผลตอบแทนเฉลี่ย</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ผลจริง</td>
                    <td class="tdstyle">
                        <asp:Label ID="F_ID" runat="server" Text="" Visible="false"></asp:Label>
                        <asp:Label ID="F_LAST2" runat="server" Text="" Visible="false"></asp:Label>
                        <input runat="server" tabindex="71" class="readonly" name="F1" id="F1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="72" class="readonly" name="F2" id="F2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="73" class="readonly" name="F3" id="F3" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="74" class="readonly" name="F4" id="F4" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="75" class="readonly" name="F5" id="F5" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="76" class="readonly2" name="FSUM0" id="FSUM0" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" style="visibility:hidden" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle"></td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="77" name="F6" id="F6" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="78" name="F7" id="F7" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="79" name="F8" id="F8" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="80" name="F9" id="F9" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="81" name="F10" id="F10" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="82" name="F11" id="F11" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="83" name="F12" id="F12" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="84" class="readonly2" name="FSUM1" id="FSUM1" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="30px" rowspan="6" style="text-align: center; font-size: 11px;">
                        <asp:Label ID="year2" runat="server" Text="y" Font-Size="11px"></asp:Label></td>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 11px;">คงเหลือ</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="85" class="readonly2" name="A13" id="A13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="86" class="readonly2" name="A14" id="A14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="87" class="readonly2" name="A15" id="A15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="88" class="readonly2" name="A16" id="A16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="89" class="readonly2" name="A17" id="A17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="90" class="readonly2" name="A18" id="A18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="91" class="readonly2" name="A19" id="A19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="92" class="readonly2" name="A20" id="A20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="93" class="readonly2" name="A21" id="A21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="94" class="readonly2" name="A22" id="A22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="95" class="readonly2" name="A23" id="A23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="96" class="readonly2" name="A24" id="A24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="97" class="readonly2" name="ASUM2" id="ASUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 11px;">ให้กู้เพิ่ม</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="98" name="B13" id="B13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="99" name="B14" id="B14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="100" name="B15" id="B15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="101" name="B16" id="B16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="102" name="B17" id="B17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="103" name="B18" id="B18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="104" name="B19" id="B19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="105" name="B20" id="B20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="106" name="B21" id="B21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="107" name="B22" id="B22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="108" name="B23" id="B23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="109" name="B24" id="B24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="110" class="readonly2" name="BSUM2" id="BSUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 11px;">รับคืน</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="111" name="C13" id="C13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="112" name="C14" id="C14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="113" name="C15" id="C15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="114" name="C16" id="C16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="115" name="C17" id="C17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="116" name="C18" id="C18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="117" name="C19" id="C19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="118" name="C20" id="C20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="119" name="C21" id="C21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="120" name="C22" id="C22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="121" name="C23" id="C23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="122" name="C24" id="C24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="123" class="readonly2" name="CSUM2" id="CSUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 11px;">เพิ่มสุทธิ</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="124" class="readonly2" name="D13" id="D13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="125" class="readonly2" name="D14" id="D14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="126" class="readonly2" name="D15" id="D15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="127" class="readonly2" name="D16" id="D16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="128" class="readonly2" name="D17" id="D17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="129" class="readonly2" name="D18" id="D18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="130" class="readonly2" name="D19" id="D19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="131" class="readonly2" name="D20" id="D20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="132" class="readonly2" name="D21" id="D21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="133" class="readonly2" name="D22" id="D22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="134" class="readonly2" name="D23" id="D23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="135" class="readonly2" name="D24" id="D24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="136" class="readonly2" name="DSUM2" id="DSUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 11px;">รายได้ดอกเบี้ย</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="137" class="readonly2" name="E13" id="E13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="138" class="readonly2" name="E14" id="E14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="139" class="readonly2" name="E15" id="E15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="140" class="readonly2" name="E16" id="E16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="141" class="readonly2" name="E17" id="E17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="142" class="readonly2" name="E18" id="E18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="143" class="readonly2" name="E19" id="E19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="144" class="readonly2" name="E20" id="E20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="145" class="readonly2" name="E21" id="E21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="146" class="readonly2" name="E22" id="E22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="147" class="readonly2" name="E23" id="E23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="148" class="readonly2" name="E24" id="E24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="149" class="readonly2" name="ESUM2" id="ESUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td class="tdstyle2" width="100px" style="text-align: center; font-size: 9px;">อัตราผลตอบแทนเฉลี่ย</td>
                    <td class="tdstyle2" width="80px" style="text-align: center; font-size: 11px;">ประมาณการ</td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="150" name="F13" id="F13" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="151" name="F14" id="F14" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="152" name="F15" id="F15" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="153" name="F16" id="F16" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="154" name="F17" id="F17" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="155" name="F18" id="F18" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="156" name="F19" id="F19" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="157" name="F20" id="F20" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="158" name="F21" id="F21" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="159" name="F22" id="F22" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="160" name="F23" id="F23" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="161" name="F24" id="F24" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" maxlength="10" />
                    </td>
                    <td class="tdstyle">
                        <input runat="server" tabindex="162" class="readonly2" name="FSUM2" id="FSUM2" onkeypress="return isNumberKey(event)" onfocus="ClearComma(this)" onblur="SetComma(this);" type="text" readonly="true" />
                    </td>
                </tr>
                <tr>
                    <td colspan="16">
                        <p style="color: red; font-family: Tahoma; font-size: 11px; margin: 0px">*หมายเหตุ : จำนวนเงินหลักพันบาท</p>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="16">
                        <asp:Button ID="SaveDocument" runat="server" Text="บันทึก" Width="60px" />&nbsp;&nbsp;<asp:Button ID="CloseBtn" runat="server" Text="ปิด" Width="60px" OnClientClick="ClosePop()" /></td>
                </tr>
            </table>
        </div>

        <%=scripttext%>
    </form>
</body>
</html>
